Wald Interval
   HOME

TheInfoList



OR:

In
statistics Statistics (from German language, German: ''wikt:Statistik#German, Statistik'', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of ...
, a binomial proportion confidence interval is a
confidence interval In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated ''confidence level''; the 95% confidence level is most common, but other levels, such as 9 ...
for the probability of success calculated from the outcome of a series of success–failure experiments (
Bernoulli trials In the theory of probability and statistics, a Bernoulli trial (or binomial trial) is a random experiment with exactly two possible outcomes, "success" and "failure", in which the probability of success is the same every time the experiment is c ...
). In other words, a binomial proportion confidence interval is an interval estimate of a success probability ''p'' when only the number of experiments ''n'' and the number of successes ''nS'' are known. There are several formulas for a binomial confidence interval, but all of them rely on the assumption of a
binomial distribution In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no quest ...
. In general, a binomial distribution applies when an experiment is repeated a fixed number of times, each trial of the experiment has two possible outcomes (success and failure), the probability of success is the same for each trial, and the trials are
statistically independent Independence is a fundamental notion in probability theory, as in statistics and the theory of stochastic processes. Two events are independent, statistically independent, or stochastically independent if, informally speaking, the occurrence of o ...
. Because the binomial distribution is a
discrete probability distribution In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
(i.e., not continuous) and difficult to calculate for large numbers of trials, a variety of approximations are used to calculate this confidence interval, all with their own tradeoffs in accuracy and computational intensity. A simple example of a binomial distribution is the set of various possible outcomes, and their probabilities, for the number of heads observed when a Coin flipping, coin is flipped ten times. The observed binomial proportion is the fraction of the flips that turn out to be heads. Given this observed proportion, the confidence interval for the true probability of the coin landing on heads is a range of possible proportions, which may or may not contain the true proportion. A 95% confidence interval for the proportion, for instance, will contain the true proportion 95% of the times that the procedure for constructing the confidence interval is employed.


Normal approximation interval or Wald interval

A commonly used formula for a binomial confidence interval relies on approximating the distribution of error about a binomially-distributed observation, \hat p, with a normal distribution. This approximation is based on the central limit theorem and is unreliable when the sample size is small or the success probability is close to 0 or 1. Using the normal approximation, the success probability ''p'' is estimated as : \hat p \pm z \sqrt, or the equivalent : \frac \pm \frac \sqrt, where \hat p = n_S / n is the proportion of successes in a Bernoulli trial process, measured with n trials yielding n_S successes and n_F = n - n_S failures, and z is the 1 - \tfrac quantile of a standard normal distribution (i.e., the probit) corresponding to the target error rate \alpha. For a 95% confidence level, the error \alpha=1-0.95=0.05, so 1 - \tfrac \alpha 2=0.975 and z=1.96. An important theoretical derivation of this confidence interval involves the inversion of a hypothesis test. Under this formulation, the confidence interval represents those values of the population parameter that would have large ''p''-values if they were tested as a hypothesized population proportion. The collection of values, \theta, for which the normal approximation is valid can be represented as : \left\, where y is the \tfrac \alpha 2 quantile of a standard normal distribution. Since the test in the middle of the inequality is a Wald test, the normal approximation interval is sometimes called the Wald interval or Wald method, after Abraham Wald, but it was first described by Pierre-Simon Laplace in 1812.


Bracketing the confidence interval

Extending the normal approximation and Wald-Laplace interval concepts, Michael Short (engineer), Michael Short has shown that inequalities on the approximation error between the binomial distribution and the normal distribution can be used to accurately bracket the estimate of the confidence interval around \hat p: :\frac - z \sqrt \le \hat p \le \frac + z \sqrt where \hat p is again the (unknown) proportion of successes in a Bernoulli trial process, measured with n trials yielding k successes, z is the 1 - \tfrac quantile of a standard normal distribution (i.e., the probit) corresponding to the target error rate \alpha, and the constants C_,C_,C_,C_,C_,C_,C_ and C_ are simple algebraic functions of z. For a fixed \alpha (and hence z), the above inequalities give easily computed one- or two-sided intervals which bracket the exact binomial upper and lower confidence limits corresponding to the error rate \alpha.


Standard error of a proportion estimation when using weighted data

Let there be a simple random sample X_1, \ldots, X_n where each X_i is Independent and identically distributed random variables, i.i.d from a Bernoulli distribution, Bernoulli(p) distribution and weight w_i is the weight for each observation. Standardize the (positive) weights w_i so they sum to 1. The Weighted arithmetic mean, weighted sample proportion is: \hat p = \sum_^n w_i X_i. Since the X_i are independent and each one has variance \text(X_i) = p(1-p), the sampling variance of the proportion therefore is: :\text(\hat p) = \sum_^n \text(w_i X_i) = p(1-p)\sum_^n w_i^2. The standard error of \hat p is the square root of this quantity. Because we do not know p(1-p), we have to estimate it. Although there are many possible estimators, a conventional one is to use \hat p, the sample mean, and plug this into the formula. That gives: :\text(\hat p) = \sqrt For unweighted data, w_i = 1/n, giving \sum_^n w_i^2 = 1/n. The SE becomes \sqrt, leading to the familiar formulas, showing that the calculation for weighted data is a direct generalization of them.


Wilson score interval

The Wilson score interval is an improvement over the normal approximation interval in multiple respects. It was developed by Edwin Bidwell Wilson (1927). Unlike the symmetric normal approximation interval (above), the Wilson score interval is asymmetric. It does not suffer from problems of ''overshoot'' and ''zero-width intervals'' that afflict the normal interval, and it may be safely employed with small samples and skewed observations. The observed coverage probability is consistently closer to the nominal value, 1 - \alpha. Like the normal interval, the interval can be computed directly from a formula. Wilson started with the normal approximation to the binomial: : z \approx \frac with the analytic formula for the sample standard deviation given by \sigma_n = \sqrt~. Combining the two, and squaring out the radical, gives an equation that is quadratic in : : \left(\, \hat - p \,\right)^ = z^\cdot\frac Transforming the relation into a standard-form quadratic equation for , treating \hat p and as known values from the sample (see prior section), and using the value of that corresponds to the desired confidence for the estimate of gives this: \left( 1 + \frac \right) p^2 + \left( - 2 - \frac \right) p + \biggl( ^2 \biggr) = 0 ~, where all of the values in parentheses are known quantities. The solution for estimates the upper and lower limits of the confidence interval for . Hence the probability of success is estimated by : p \approx ( w^- , w^+ ) = \frac\left( \hat p+\frac \right) ~ \pm ~ \frac\sqrt ~ or the equivalent : p \approx \frac ~ \pm ~ \frac \sqrt~. The practical observation from using this interval is that it has good properties even for a small number of trials and / or an extreme probability. Intuitively, the center value of this interval is the weighted average of \hat and \tfrac, with \hat receiving greater weight as the sample size increases. Formally, the center value corresponds to using a pseudocount of , the number of standard deviations of the confidence interval: add this number to both the count of successes and of failures to yield the estimate of the ratio. For the common two standard deviations in each direction interval (approximately 95% coverage, which itself is approximately 1.96 standard deviations), this yields the estimate (n_S+2)/(n+4), which is known as the "plus four rule". Although the quadratic can be solved explicitly, in most cases Wilson's equations can also be solved numerically using the fixed-point iteration : p_=\hat \pm z\cdot\sqrt with p_0 = \hat. The Wilson interval can also be derived from the z-test, single sample z-test or Pearson's chi-squared test with two categories. The resulting interval, :\left\, can then be solved for \theta to produce the Wilson score interval. The test in the middle of the inequality is a score test.


The interval equality principle

Since the interval is derived by solving from the normal approximation to the binomial, the Wilson score interval ( w^- , w^+ ) has the property of being guaranteed to obtain the same result as the equivalent z-test or Pearson's chi-squared test, chi-squared test. This property can be visualised by plotting the probability density function for the Wilson score interval (see Wallis 2021: 297-313) and then plotting a normal pdf at each bound. The tail areas of the resulting Wilson and normal distributions, representing the chance of a significant result in that direction, must be equal. The continuity-corrected Wilson score interval and the Clopper-Pearson interval are also compliant with this property. The practical import is that these intervals may be employed as Statistical hypothesis testing, significance tests, with identical results to the source test, and new tests may be derived by geometry.


Wilson score interval with continuity correction

The Wilson interval may be modified by employing a continuity correction, in order to align the minimum coverage probability, rather than the average coverage probability, with the nominal value, 1 - \alpha. Just as the Wilson interval mirrors Pearson's chi-squared test, the Wilson interval with continuity correction mirrors the equivalent Yates's correction for continuity, Yates' chi-squared test. The following formulae for the lower and upper bounds of the Wilson score interval with continuity correction ( w_^- , w_^+ ) are derived from Newcombe (1998). :\begin w_^- &= \max\left\ \\ w_^+ &= \min\left\ \end However, if ''p'' = 0, w_^- must be taken as 0; if ''p'' = 1, w_^+ is then 1. Wallis (2021) identifies a simpler method for computing continuity-corrected Wilson intervals that employs functions. For the lower bound, let \mathrm(\hat, n, \alpha/2) = w^-, where \alpha is the selected error level for z. Then w_^- = \mathrm(\max(\hat - \tfrac, 0), n, \alpha/2). This method has the advantage of being further decomposable.


Jeffreys interval

The ''Jeffreys interval'' has a Bayesian derivation, but it has good frequentist properties. In particular, it has coverage properties that are similar to those of the Wilson interval, but it is one of the few intervals with the advantage of being ''equal-tailed'' (e.g., for a 95% confidence interval, the probabilities of the interval lying above or below the true value are both close to 2.5%). In contrast, the Wilson interval has a systematic bias such that it is centred too close to ''p'' = 0.5. The Jeffreys interval is the Bayesian credible interval obtained when using the non-informative prior, non-informative Jeffreys prior for the binomial proportion . The Jeffreys prior#Bernoulli trial, Jeffreys prior for this problem is a Beta distribution with parameters , it is a conjugate prior. After observing successes in trials, the posterior distribution for is a Beta distribution with parameters . When and , the Jeffreys interval is taken to be the equal-tailed posterior probability interval, i.e., the and quantiles of a Beta distribution with parameters . These quantiles need to be computed numerically, although this is reasonably simple with modern statistical software. In order to avoid the coverage probability tending to zero when or , when the upper limit is calculated as before but the lower limit is set to 0, and when the lower limit is calculated as before but the upper limit is set to 1.


Clopper–Pearson interval

The Clopper–Pearson interval is an early and very common method for calculating binomial confidence intervals. This is often called an 'exact' method, because it is based on the cumulative probabilities of the binomial distribution (i.e., exactly the correct distribution rather than an approximation). However, in cases where we know the population size, the intervals may not be the smallest possible. For instance, for a population of size 20 with true proportion of 50%, Clopper–Pearson gives [0.272, 0.728], which has width 0.456 (and where bounds are 0.0280 away from the "next achievable values" of 6/20 and 14/20); whereas Wilson's gives [0.299, 0.701], which has width 0.401 (and is 0.0007 away from the next achievable values). The Clopper–Pearson interval can be written as : S_ \cap S_ or equivalently, : \left( \inf S_\,,\, \sup S_ \right) with : S_ := \left\ \text S_ := \left\, where 0 ≤ ''x'' ≤ ''n'' is the number of successes observed in the sample and Bin(''n''; ''θ'') is a binomial random variable with ''n'' trials and probability of success ''θ''. Equivalently we can say that the Clopper–Pearson interval is \left(\frac - \varepsilon_1,\ \frac + \varepsilon_2\right) with confidence level 1 - \alpha if \varepsilon_i is the infimum of those such that the following tests of hypothesis succeed with significance \frac: # H0: \theta = \frac - \varepsilon_1 with HA: \theta > \frac - \varepsilon_1 # H0: \theta = \frac + \varepsilon_2 with HA: \theta < \frac + \varepsilon_2. Because of a relationship between the binomial distribution and the beta distribution, the Clopper–Pearson interval is sometimes presented in an alternate format that uses quantiles from the beta distribution. :B\left(\frac; x , n - x + 1 \right) < \theta < B\left(1 - \frac; x + 1, n - x\right) where ''x'' is the number of successes, ''n'' is the number of trials, and ''B''(''p''; ''v'',''w'') is the ''p''th Cumulative distribution function#Inverse distribution function (quantile function), quantile from a beta distribution with shape parameters ''v'' and ''w''. Thus, \theta_ < \theta < \theta_, where: :\frac\int_0^ t^(1-t)^dt = \frac :\frac\int_0^ t^(1-t)^dt = 1-\frac The binomial proportion confidence interval is then (\theta_, \theta_), as follows from the relation between the Binomial distribution#Cumulative distribution function, Binomial distribution cumulative distribution function and the Beta_function#Incomplete_beta_function, regularized incomplete beta function. When x is either 0 or n, closed-form expressions for the interval bounds are available: when x = 0 the interval is \left(0,\, 1 - \left(\frac\right)^\frac \right) and when x = n it is \left(\left(\frac\right)^\frac,\, 1\right). The beta distribution is, in turn, related to the F-distribution so a third formulation of the Clopper–Pearson interval can be written using F quantiles: : \left( 1 + \frac \right)^ < \theta < \left( 1 + \frac \right)^ where ''x'' is the number of successes, ''n'' is the number of trials, and ''F''(''c''; ''d''1, ''d''2) is the ''c'' quantile from an F-distribution with ''d''1 and ''d''2 degrees of freedom. The Clopper–Pearson interval is an exact interval since it is based directly on the binomial distribution rather than any approximation to the binomial distribution. This interval never has less than the nominal coverage for any population proportion, but that means that it is usually conservative. For example, the true coverage rate of a 95% Clopper–Pearson interval may be well above 95%, depending on ''n'' and ''θ''. Thus the interval may be wider than it needs to be to achieve 95% confidence. In contrast, it is worth noting that other confidence bounds may be narrower than their nominal confidence width, i.e., the normal approximation (or "standard") interval, Wilson interval, Agresti–Coull interval, etc., with a nominal coverage of 95% may in fact cover less than 95%. The definition of the Clopper–Pearson interval can also be modified to obtain exact confidence intervals for different distributions. For instance, it can also be applied to the case where the samples are drawn without replacement from a population of a known size, instead of repeated draws of a binomial distribution. In this case, the underlying distribution would be the hypergeometric distribution. The interval boundaries are easily computed with numerical methods functions lik
qbeta
in R an

in Python. from scipy.stats import beta k = 20 n = 400 alpha = 0.05 p_u, p_o = beta.ppf([alpha/2, 1 - alpha/2], [k, k + 1], [n - k + 1, n - k])


Agresti–Coull interval

The Agresti–Coull interval is also another approximate binomial confidence interval. Given n_S successes in n trials, define :\tilde = n + z^2 and :\tilde = \frac\left(n_S + \frac\right) Then, a confidence interval for p is given by : \tilde \pm z \sqrt where z = \Phi^\!\left(1 - \frac\!\right) is the quantile of a standard normal distribution, as before (for example, a 95% confidence interval requires \alpha = 0.05, thereby producing z = 1.96). According to Lawrence D. Brown, Brown, T. Tony Cai, Cai, and DasGupta, taking z = 2 instead of 1.96 produces the "add 2 successes and 2 failures" interval previously described by Alan Agresti, Agresti and Brent Coull, Coull. This interval can be summarised as employing the centre-point adjustment, \tilde, of the Wilson score interval, and then applying the Normal approximation to this point. : \tilde = \frac


Arcsine transformation

The arcsine transformation has the effect of pulling out the ends of the distribution. While it can stabilize the variance (and thus confidence intervals) of proportion data, its use has been criticized in several contexts. Let ''X'' be the number of successes in ''n'' trials and let ''p'' = ''X''/''n''. The variance of ''p'' is : \operatorname(p) = \frac . Using the arc sine transform the variance of the arcsine of ''p''1/2 isShao J (1998) Mathematical statistics. Springer. New York, New York, USA : \operatorname\left(\arcsin\left(\sqrt\right)\right) \approx \frac = \frac = \frac . So, the confidence interval itself has the following form: : \sin^2\left(\arcsin\left(\sqrt\right) - \frac\right) < \theta < \sin^2\left(\arcsin\left(\sqrt\right) + \frac\right) where z is the \scriptstyle 1 \,-\, \frac quantile of a standard normal distribution. This method may be used to estimate the variance of ''p'' but its use is problematic when ''p'' is close to 0 or 1.


''t''''a'' transform

Let ''p'' be the proportion of successes. For 0 ≤ ''a'' ≤ 2, : t_a = \log\left( \frac \right) = a \log(p) - (2-a) \log(1-p) This family is a generalisation of the logit transform which is a special case with ''a'' = 1 and can be used to transform a proportional data distribution to an approximately normal distribution. The parameter ''a'' has to be estimated for the data set.


Rule of three — for when no successes are observed

The Rule of three (statistics), rule of three is used to provide a simple way of stating an approximate 95% confidence interval for ''p'', in the special case that no successes (\hat p = 0) have been observed.Steve Simon (2010
"Confidence interval with zero events"
The Children's Mercy Hospital, Kansas City, Mo. (website: "Ask Professor Mean a
Stats topics or Medical Research
)
The interval is . By symmetry, one could expect for only successes (\hat p = 1), the interval is .


Comparison and discussion

There are several research papers that compare these and other confidence intervals for the binomial proportion. Both Agresti and Coull (1998) and Ross (2003) point out that exact methods such as the Clopper–Pearson interval may not work as well as certain approximations. The Normal approximation interval and its presentation in textbooks has been heavily criticised, with many statisticians advocating that it be not used. The principal problems are ''overshoot'' (bounds exceed [0, 1]), ''zero-width intervals'' at \hat p = 0 and 1 (falsely implying certainty), and overall inconsistency with significance testing. Of the approximations listed above, Wilson score interval methods (with or without continuity correction) have been shown to be the most accurate and the most robust, though some prefer the Agresti–Coull approach for larger sample sizes. Wilson and Clopper–Pearson methods obtain consistent results with source significance tests, and this property is decisive for many researchers. Many of these intervals can be calculated in R (programming language), R using packages lik
"binom"


See also

* Binomial distribution#Confidence intervals * Estimation theory * Pseudocount


References

{{DEFAULTSORT:Binomial Proportion Confidence Interval Statistical approximations Statistical intervals